package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PremaidFoodMapper;
import com.ruoyi.system.domain.PremaidFood;
import com.ruoyi.system.service.IPremaidFoodService;

/**
 * 预制菜品类管理Service业务层处理
 * 
 * @author liukangzu
 * @date 2025-04-17
 */
@Service
public class PremaidFoodServiceImpl implements IPremaidFoodService 
{
    @Autowired
    private PremaidFoodMapper premaidFoodMapper;

    /**
     * 查询预制菜品类管理
     * 
     * @param premaidFoodId 预制菜品类管理主键
     * @return 预制菜品类管理
     */
    @Override
    public PremaidFood selectPremaidFoodByPremaidFoodId(Integer premaidFoodId)
    {
        return premaidFoodMapper.selectPremaidFoodByPremaidFoodId(premaidFoodId);
    }

    /**
     * 查询预制菜品类管理列表
     * 
     * @param premaidFood 预制菜品类管理
     * @return 预制菜品类管理
     */
    @Override
    public List<PremaidFood> selectPremaidFoodList(PremaidFood premaidFood)
    {
        return premaidFoodMapper.selectPremaidFoodList(premaidFood);
    }

    /**
     * 新增预制菜品类管理
     * 
     * @param premaidFood 预制菜品类管理
     * @return 结果
     */
    @Override
    public int insertPremaidFood(PremaidFood premaidFood)
    {
        return premaidFoodMapper.insertPremaidFood(premaidFood);
    }

    /**
     * 修改预制菜品类管理
     * 
     * @param premaidFood 预制菜品类管理
     * @return 结果
     */
    @Override
    public int updatePremaidFood(PremaidFood premaidFood)
    {
        return premaidFoodMapper.updatePremaidFood(premaidFood);
    }

    /**
     * 批量删除预制菜品类管理
     * 
     * @param premaidFoodIds 需要删除的预制菜品类管理主键
     * @return 结果
     */
    @Override
    public int deletePremaidFoodByPremaidFoodIds(Integer[] premaidFoodIds)
    {
        return premaidFoodMapper.deletePremaidFoodByPremaidFoodIds(premaidFoodIds);
    }

    /**
     * 删除预制菜品类管理信息
     * 
     * @param premaidFoodId 预制菜品类管理主键
     * @return 结果
     */
    @Override
    public int deletePremaidFoodByPremaidFoodId(Integer premaidFoodId)
    {
        return premaidFoodMapper.deletePremaidFoodByPremaidFoodId(premaidFoodId);
    }


    /**
     * 批量上下架预制菜品类管理
     *
     * @param premaidFoodIds 预制菜品类管理主键
     * @return 结果
     */
    @Override
    public int topPremaidFoodByPremaidFoodIds(Integer[] premaidFoodIds)
    {
        return premaidFoodMapper.topPremaidFoodByPremaidFoodIds(premaidFoodIds);
    }

    /**
     * 上下架预制菜品类管理信息
     *
     * @param premaidFoodId 预制菜品类管理主键
     * @return 结果
     */
    @Override
    public int topPremaidFoodByPremaidFoodId(Integer premaidFoodId)
    {
        return premaidFoodMapper.topPremaidFoodByPremaidFoodId(premaidFoodId);
    }
}
